<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0; padding: 0;
        }
        body{
            display: flex;
            flex-direction: column;
            min-height: 100vh;
        }
        nav, footer{
            height: 150px;
            width: 100vw;
            background-color: #ccc;
        }
        main{
            width: 100vw;
            flex: 1;
        }
    </style>
</head>
<body>
    <nav>
        nav
    </nav>
    <main>
        <h1>内容过短，页脚固定在底部</h1>
        <p>内容</p><br><p>内容</p><br><p>内容</p><br><p>内容</p><br>
    </main>
    <footer>
        footer
    </footer>
</body>
</html>
